// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CMIResponse.java

package com.iphaeton.lms.course.scorm12.datamodel.cmi;

import com.iphaeton.lms.course.scorm12.DebugIndicator;
import com.iphaeton.lms.course.scorm12.datamodel.Element;
import java.io.PrintStream;
import java.io.Serializable;

// Referenced classes of package com.iphaeton.lms.course.scorm12.datamodel.cmi:
//            CMICategory, CMIRequest, DMErrorManager

public class CMIResponse extends CMICategory
    implements Serializable
{

    public CMIResponse()
    {
        super(true);
        pattern = new Element("", "checkFeedback", "NULL", true, false, false);
    }

    public Element getPattern()
    {
        return pattern;
    }

    public boolean isInitialized()
    {
        boolean flag = false;
        if(pattern.isInitialized())
            flag = true;
        return flag;
    }

    public void setPattern(String inPattern)
    {
        pattern.setValue(inPattern);
    }

    public void performSet(CMIRequest theRequest, DMErrorManager dmErrorMgr)
    {
        String token = theRequest.getNextToken();
        if(theRequest.hasMoreTokensToProcess())
        {
            if(_Debug)
            {
                System.out.println("Error - Data Model Element not implemented");
                System.out.println("Element being processed: " + token + "is not a valid element of the CMI Response\n" + "Data Model Category");
            }
            dmErrorMgr.recNotImplementedError(theRequest);
        } else
        if(!theRequest.isAKeywordRequest())
        {
            String value = theRequest.getValue();
            doSet(this, token, value, dmErrorMgr);
        } else
        {
            dmErrorMgr.recKeyWordError(token);
        }
    }

    private static final long serialVersionUID = 0x9c19b2d9efb398fcL;
    private static boolean _Debug;
    public Element pattern;

    static 
    {
        _Debug = DebugIndicator.ON;
    }
}
